package pojo;

/**
 * FinishstatusId entity. @author MyEclipse Persistence Tools
 */

public class FinishstatusId implements java.io.Serializable {

	// Fields

	private Student student;
	private Homework homework;

	// Constructors

	/** default constructor */
	public FinishstatusId() {
	}

	/** full constructor */
	public FinishstatusId(Student student, Homework homework) {
		this.student = student;
		this.homework = homework;
	}

	// Property accessors

	public Student getStudent() {
		return this.student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public Homework getHomework() {
		return this.homework;
	}

	public void setHomework(Homework homework) {
		this.homework = homework;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof FinishstatusId))
			return false;
		FinishstatusId castOther = (FinishstatusId) other;

		return ((this.getStudent() == castOther.getStudent()) || (this
				.getStudent() != null && castOther.getStudent() != null && this
				.getStudent().equals(castOther.getStudent())))
				&& ((this.getHomework() == castOther.getHomework()) || (this
						.getHomework() != null
						&& castOther.getHomework() != null && this
						.getHomework().equals(castOther.getHomework())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result
				+ (getStudent() == null ? 0 : this.getStudent().hashCode());
		result = 37 * result
				+ (getHomework() == null ? 0 : this.getHomework().hashCode());
		return result;
	}

}